import time


def crawl_page(url):
    print('正在爬取 {}'.format(url))
    sleep_time = int(url.split('_')[-1])
    time.sleep(sleep_time)
    print('OK {}'.format(url))


def main(urls):
    time_start = time.time()
    for url in urls:
        crawl_page(url)
    time_end = time.time()
    print("爬取耗时共计{}s".format(int(time_end - time_start)))

if __name__ == '__main__':

    main(['url_1', 'url_2', 'url_3', 'url_4'])